package cn.findviewbydream.evil.main.entity

import java.io.Serializable

/********************************************
 * 工程名：MealOrder
 * 包名：cn.findviewbydream.evil.main.entity
 * 时间：16-12-21
 * 作者：白雨濃 evil
 * 邮箱：evilbai@foxmail.com
 * 内容：基础表->工种实体
 ********************************************/
class BaseTypeOfWorkEntity : Serializable
{
    var typeOfWorkId = 0/*id*/
    var type = ""/*类型*/
    var state = false

    constructor()

    constructor(typeOfWorkId: Int)
    {
        this.typeOfWorkId = typeOfWorkId
    }

    constructor(typeOfWorkId: Int, type: String, state: Boolean)
    {
        this.typeOfWorkId = typeOfWorkId
        this.type = type
        this.state = state
    }

    override fun toString(): String
    {
        return "BaseTypeOfWorkEntity(typeOfWorkId=$typeOfWorkId, type='$type', state=$state)"
    }

    override fun equals(other: Any?): Boolean
    {
        if (this === other) return true
        if (other?.javaClass != javaClass) return false

        other as BaseTypeOfWorkEntity

        if (typeOfWorkId != other.typeOfWorkId) return false

        return true
    }

    override fun hashCode(): Int
    {
        return typeOfWorkId
    }
}